package com.supermap.dataservice.server.Version;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * Created by gu on 2019-04-25.
 */
public interface VersionMapper {
    /**
     * \获取系统版最新版本号、下载路径、版本描述
     * */
    @Select("select `version`,`descript`,`downurl`,DATE_FORMAT(`createtime`,'%Y-%m-%d %H:%i:%s') as createtime from t_version t " +
            "where t.pakage = #{currentPackage} and t.createtime < now() " +
            "order by t.createtime desc limit 1\n"
    )
    List<Map<String,Object>> getLatestVersion(@Param("currentPackage")String currentPackage);

}
